<table>
    <thead>
        <tr>
            <th>项目</th>
            <th>数量</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            @foreach($data as $k => $v)
                <td>{{$k}}</td>
                <td>{{$v->count()}}</td>
            @endforeach
        </tr>
        <tr>
            <td>总计</td>
            <td>{{$sum}}</td>
        </tr>
    </tbody>
</table>